/******************************************************************************
*@file  : main.c
*@brief : This file provides UART Demos
*@ver   : 1.0.0
*@date  : 2022.10.20
******************************************************************************/

#include "app.h"  

int main(void)
{
    HAL_Init();     
    SystemClock_Config(SYSCLK_180M_SRC_RC64M, RCC_PCLK1_DIV_1, RCC_PCLK2_DIV_1);     
    HAL_Init_Ex();   
    
    BSP_UART_Init(UART1); 

    BSP_PB_Init();

    printfS("--------------------------------------------------------------------\r\n");
    
    UART1_Init();
    UART2_Init();
    
    printfS("UART PINs selected:\r\n");
    printfS("UART1 TXD:PA14, RXD:PA15\r\n");
    printfS("UART2 TXD:PB2 , RXD:PB3\r\n");
    printfS("Modify HAL_UART_MspInit() function in user code if you select other UART PINs\r\n\r\n");
    
    printfS("UART1 baudrate cfg: %d\r\n", UART1_Handle.Init.BaudRate);
    printfS("UART2 baudrate cfg: %d\r\n\r\n", UART2_Handle.Init.BaudRate);
    /* 
    Select Mode: 
    TEST_UART1_LOOP, 
    TEST_UART1_IT, 
    TEST_UART2_IT, 
    TEST_UART2_LOOP, 
    */  
    APP_Test(TEST_UART1_LOOP);  

    while(1)
    {

    }
}
